WriteAxisAlias
Writes an alias index into an axis. The alias index allows you to reorder the list of axes if the cabling doesn't match the program.
Syntax
KsError WriteAxisAlias(
int Index,
int Alias
);
Parameters
Index: the index of an axis. Indexes are zero based. Aliases affect this parameter.
Alias: alias index for the axis to replace the index in the axis list. Indexes are zero based.
Return value
If the function succeeds, it returns errNoError
, otherwise an error code. For more information about the error code, see the KsError list.
Remarks
- Reorders axes. Use it after the KINGSTAR Subsystem is started.
- The alias index can be outside the actual index range of the axes.
Usable EtherCAT states
ecatOP
Example
Copy
#define AxisX 101
#define AxisZ 102
#define AxisC 103
// Apply the aliases
nRet = WriteAxisAlias(1, AxisX);
nRet = WriteAxisAlias(2, AxisZ);
nRet = WriteAxisAlias(0, AxisC);
nRet = EnableAliases(TRUE);
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksapi.h | ksapi.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also